package com.kyh.sys.entity;

import java.util.Date;

import javax.persistence.Table;

import com.kyh.annotation.Model;
import com.kyh.entity.base.BaseEntity;

/**
*/
@Table(name="sys_role", catalog="role_id")
public class Role extends BaseEntity<Role> {

	@Model(nameTable="roleId")
	private Long roleId; // 主键ID
	@Model(nameTable="roleName")
	private String roleName; // 角色名称
	@Model(nameTable="status")
	private Integer status; // 
	@Model(nameTable="createTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date createTime; // 
	@Model(nameTable="updateTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date updateTime; // 

	public Long getRoleId() {
		return roleId;
	}
	public Role setRoleId(Long roleId) {
		this.roleId = roleId;
		return this;
	}
	public String getRoleName() {
		return roleName;
	}
	public Role setRoleName(String roleName) {
		this.roleName = roleName;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public Role setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public Role setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public Role setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static Role role(
			String roleName,
			Integer status
			) {
		Role entity = new Role();
		entity.setRoleName(roleName);
		entity.setStatus(status);
		return entity;
	}
}